/**
 * 
 */
package com.iwords.service.object;

import java.io.Serializable;
import java.util.Date;

import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;

/**
 * @author    	huangbaichuan 
 * @time      	2011-8-14    
 * @description	老師Entity  
 */
@Entity
@Table(name = "teacher")
public class TeacherEntity implements Serializable {

    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    private Long id;
    private String teachername;
    private String password;
    private String marketingid;
    private Integer pid;
    private int status;
    @Temporal(javax.persistence.TemporalType.TIMESTAMP)
    private Date createtime;
    @Temporal(javax.persistence.TemporalType.TIMESTAMP)
    private Date updatetime;
    @Column(name = "school_id")
    private Long schoolId;

    public Long getSchoolId() {
        return schoolId;
    }

    public void setSchoolId(Long schoolId) {
        this.schoolId = schoolId;
    }
    
    
    /**
     * @return the teacherid
     */
    public Long getId() {
        return id;
    }

    /**
     * @param teacherid
     *            the teacherid to set
     */
    public void setId(Long id) {
        this.id = id;
    }

    /**
     * @return the teachername
     */
    public String getTeachername() {
        return teachername;
    }

    /**
     * @param teachername
     *            the teachername to set
     */
    public void setTeachername(String teachername) {
        this.teachername = teachername;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    /**
     * @return the marketingid
     */
    public String getMarketingid() {
        return marketingid;
    }

    /**
     * @param marketingid
     *            the marketingid to set
     */
    public void setMarketingid(String marketingid) {
        this.marketingid = marketingid;
    }

    /**
     * @return the pid
     */
    public Integer getPid() {
        return pid;
    }

    /**
     * @param pid
     *            the pid to set
     */
    public void setPid(Integer pid) {
        this.pid = pid;
    }

    /**
     * @return the status
     */
    public int getStatus() {
        return status;
    }

    /**
     * @param status
     *            the status to set
     */
    public void setStatus(int status) {
        this.status = status;
    }

    /**
     * @return the createtime
     */
    public Date getCreatetime() {
        return createtime;
    }

    /**
     * @param createtime
     *            the createtime to set
     */
    public void setCreatetime(Date createtime) {
        this.createtime = createtime;
    }

    /**
     * @return the updatetime
     */
    public Date getUpdatetime() {
        return updatetime;
    }

    /**
     * @param updatetime
     *            the updatetime to set
     */
    public void setUpdatetime(Date updatetime) {
        this.updatetime = updatetime;
    }

    @Override
    public boolean equals(Object obj) {
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        final TeacherEntity other = (TeacherEntity) obj;
        if (this.id != other.id && (this.id == null || !this.id.equals(other.id))) {
            return false;
        }
        return true;
    }

    @Override
    public int hashCode() {
        int hash = 7;
        hash = 47 * hash + (this.id != null ? this.id.hashCode() : 0);
        return hash;
    }
}
